
<div class="box box-solid">
    <div class="box-body table-responsive ">
    <div class="box-header"> 
</div> 
        <table class="table table-hover table-bordered">

                <tr>
                <th>优惠券ID</th>
                <th>优惠券名称</th>
                <th>优惠券金额</th>
                <th>使用状态</th>
                <th>失效状态</th>
                <th>结束时间</th>
                <th>使用满足金额</th> 
                <th>创建时间</th>
            </tr>
   <?php if(!empty($data['data'])){ ?>
      <?php foreach ($data['data'] as $key => $value) { ?>
        <tr>
            <td><?php echo $value['coupon_id']; ?></td>  
            <td><?php echo $value['name']; ?></td>  
            <td><?php echo $value['amount']; ?></td>  
            <td><?php echo $value['is_used']==1?'已使用':'未使用'; ?></td>
            <td>
            <?php 
                $txt = '未失效';
                if ($value['is_dead']==1 || ($value['end_time']<time() && $value['end_time']!=0)) {
                     $txt = '已失效';
                 } 
                echo $txt;
             ?>
             </td>
            <td><?php  if($value['end_time']>0) echo date('Y-m-d H:i:s',$value['end_time']); ?></td>  
            <td><?php echo $value['mini_use_money']; ?></td>   
            <td><?php echo date('Y-m-d H:i:s',$value['ctime']); ?></td>  
        </tr>
            <?php }?>
        <?php }?> 
        </table>
    </div>
    <div class="box-footer clearfix"> 
    <?php if(!empty($data['pager'])): ?> 
        <?php $this->widget('BLinkPager', array('pages'=>$data['pager'])); ?>
    <?php endif; ?>
    </div>

</div>
